package com.kaoshi.employee.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kaoshi.employee.bean.Employee;
import com.kaoshi.employee.service.EmployeeService;
import com.kaoshi.employee.mapper.EmployeeMapper;
import org.springframework.stereotype.Service;

/**
* @author Enrique
* @description 针对表【employee】的数据库操作Service实现
* @createDate 2024-10-17 14:27:03
*/
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee>
    implements EmployeeService{

    @Override
    public Page<Employee> getPageList(int page, int limit, Employee empVo) {
        //1.封装分页
        Page<Employee> pageParam = new Page<>(page, limit);
        //2.封装条件
        LambdaQueryWrapper<Employee> employeeLambdaQueryWrapper = new LambdaQueryWrapper<>();
        //if(){}
        //3.调用方法查询
        return baseMapper.selectPage(pageParam,employeeLambdaQueryWrapper);
    }
}




